<!DOCTYPE html>
<html lang="zh">
<head>
    <title>商户中心</title>
    <{include file="merchant/public/header"}>
    <{include file="merchant/public/data_tables_css"}>

</head>
<body class="hold-transition sidebar-mini layout-fixed">
<!-- Site wrapper -->
<div class="wrapper">
    <!-- Navbar -->
    <{include file="merchant/public/navbar"}>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <!--左侧菜单-->
    <{include file="merchant/public/sidebar"}>

    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1></h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="<{:url('/plugin/merchant.index/index')}>">首页</a></li>
                            <li class="breadcrumb-item active">提现记录</li>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>
        <section class="content">
            <div class="container-fluid">


                <div class="card">


                    <div class="card-body">
                        <table id="my_table" class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>单号</th>
                                <th>状态</th>
                                <th>申请金额</th>
                                <th>手续费</th>
                                <th>途径</th>
                                <th>说明</th>
                                <th>申请时间</th>
                                <th>审核时间</th>
                            </tr>
                            </thead>
                            <tbody>


                            <{if !empty($data)}>
                            <{foreach $data as $item}>
                            <tr>
                                <td><{$item.order_no}></td>
                                <td>
                                    <{$item.status_desc}>
                                </td>
                                <td><{$item.num}></td>
                                <td><{$item.fee}></td>
                                <td>
                                    姓名：<{$item.username}> <br>
                                    <{$item.to_type_desc}>：<{$item.to_account}>
                                </td>
                                <td class="bs-red">
                                    <{if $item.status==-1}>
                                    <{$item.fail_text?$item.fail_text:''}>
                                    <{elseif $item.status==1 && !empty($item.imgs)}>
                                    <span class="btn btn-success" onclick="view_pic(this)" data-imgs="<{$item.imgs}>"> 查看凭证</span>
                                    <{/if}>
                                </td>
                                <td>
                                    <{$item.add_time}>
                                </td>
                                <td>
                                    <{if $item.status<>0}>
                                    <{$item.up_time}>
                                    <{else}>
                                    待审核
                                    <{/if}>
                                </td>
                            </tr>
                            <{/foreach}>
                            <{/if}>



                            </tbody>
                            <tfoot>


                            </tfoot>
                        </table>
                    </div>
                    <div class="card-footer">
                        <{$page?$page->render():''}>
                    </div>
                    <!-- /.card-body -->
                </div>
            </div>
        </section>

    </div>


</div>
<!-- ./wrapper -->

<{include file="merchant/public/footer"}>
<!-- DataTables  & Plugins -->
<{include file="merchant/public/data_tables"}>
<script>
    function view_pic(obj){
        var src = $(obj).data('imgs');
        var wh = window.innerWidth;
        var w = '500px';
        if (wh<600){
            w = '100%'
        }
        layer.open({
            title: '转账凭证',
            area:[w,'600px'],
            content:"<div><img style='max-width: 100%' src='"+src+"'></div>"
        })
    }

    $(function () {
        $("#my_table").DataTable({
            "ordering": false,//禁用排序
            "responsive": true,
            "lengthChange": false,
            "autoWidth": false,
            //"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"],
            // "pageLength": 10,         //初始化显示几条数据
            //serverSide: true, // use local process instead of server
              bFilter: false, // show top right search input box.
            bPaginate: false,//是否开启分页
            iDisplayLength: 10, //默认显示的记录数
            bInfo: false,//是否显示页脚信息，DataTables插件左下角显示记录数
        }).buttons().container().appendTo('#my_table_wrapper .col-md-6:eq(0)');

    });


</script>
<script>

</script>
</body>
</html>
